package org.dreamfly.core.page;

import java.io.Serializable;
import java.util.List;


public class PageResultSet<T> implements Serializable {
	//当前页的数据信息
	private List<T> list;
	//当前页的信息
	private PageInfo pageInfo;

    private String keyWords;

    private String type;

    private String actionName;

    private String idList;
	public List<T> getList() {
		return list;
	}
	public void setList(List<T> list) {
		this.list = list;
	}
	public PageInfo getPageInfo() {
		return pageInfo;
	}
	public void setPageInfo(PageInfo pageInfo) {
		this.pageInfo = pageInfo;
	}

    public String getKeyWords() {
        return keyWords;
    }

    public void setKeyWords(String keyWords) {
        this.keyWords = keyWords;
    }
    
  //需要查询数据库否
	public boolean needQueryDB(){
        if(pageInfo.getTotalRow() == list.size()){
            return false;
        }
		if(pageInfo.getClientPage() * pageInfo.getPageSize() > list.size()){
			return true;
		}else{
			return false;
		}
	}

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getActionName() {
        return actionName;
    }

    public void setActionName(String actionName) {
        this.actionName = actionName;
    }

    public String getIdList() {
        return idList;
    }

    public void setIdList(String idList) {
        this.idList = idList;
    }
}
